#!/usr/bin/make -f

include /usr/share/cdbs/1/class/ant.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk

JAVA_HOME = /usr/lib/jvm/default-java

DEB_ANT_INSTALL_TARGET = install_applet
DEB_ANT_CLEAN_TARGET = distclean
DEB_ANT_ARGS += -Dprefix=/usr -Dbuild.type=stripped -Ddestdir=$(DEB_DESTDIR)

SHAREDIR := /usr/share/cortado
install/cortado::
	for type in ov ovt mmjs; do \
	  dh_link $(SHAREDIR)/cortado-$${type}-stripped-$(DEB_UPSTREAM_VERSION).jar \
	    $(SHAREDIR)/cortado-$${type}.jar; \
	done
	dh_link $(SHAREDIR)/cortado-ovt-stripped-$(DEB_UPSTREAM_VERSION).jar \
	  $(SHAREDIR)/cortado.jar
